import {defineStore} from "pinia";
import {getRequest} from "@/util/request.js";

export const useSystemStore = defineStore('system', {
    state() {
        return {
            color: "#1e9fff",
            categories: [],
        }
    },
    actions: {
        getColor() {
            return this.color;
        },
    }
})

export const useUserStore = defineStore('user', {
    state() {
        return {
            user: {},
        }
    },
    actions: {
        logout() {
            this.user = {};
            localStorage.removeItem("tokenName");
            localStorage.removeItem("tokenValue");
        }
    }
})